package sysRecomd;


public class HingeLoss extends ClassificationRevue {

	@Override
	protected double gradient(double f, double y) {
		if (f * y < 1)
			return -y;
		else
			return 0;
	}

	@Override
	protected double cout(double f, double y) {
		return Math.max(0, 1 - f * y);
	}

}
